//
//  GoodsModel.m
//  JiuLe
//
//  Created by SunChao on 16/10/10.
//  Copyright © 2016年 Fine. All rights reserved.
//

#import "GoodsModel.h"

@implementation GoodsModel
-(instancetype)initWithDict:(NSDictionary *)dict{
    if (self=[super init]) {
        self.type=dict[@"good_type"];
        self.title=dict[@"good_title"];
        self.image=dict[@"thumb_image"];
        self.price=dict[@"price"];
        self.discountprice =dict[@"discountprice"];
        self.status = dict[@"status"];
        self.goodsId = dict[@"id"];
    }
    return self;
}
+(instancetype) appWithDict:(NSDictionary *)dict{
    
    // 为何使用self，谁调用self方法 self就会指向谁！！
    return [[self alloc] initWithDict:dict];
    
}
@end
